package org.sbbs.security.webapp.action;

import javax.servlet.http.HttpServletRequest;

import org.sbbs.base.webapp.action.BaseGridAction;
import org.sbbs.base.webapp.search.PropertySearchBuilder;
import org.sbbs.security.service.MenuManager;

import com.googlecode.genericdao.search.Search;
import com.googlecode.genericdao.search.SearchResult;

public class MenuPagedAction extends BaseGridAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5016169918864977724L;
	private MenuManager menuManager;

	public void setMenuManager(MenuManager menuManager) {
		this.menuManager = menuManager;
	}

	public String gridPageList() {
		HttpServletRequest req = this.getRequest();
		Search search = PropertySearchBuilder.BuildSearch(getRequest());
		SearchResult srt = this.menuManager.searchAndCount(search);
		this.preGridPageResult(search, srt);
		return this.ajaxReturn.success("load success,dwz message test.");
	}

}
